<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js练习</title>
    <script src="https://cdn.staticfile.org/vue/2.7.0/vue.min.js"></script>
</head>
<body>
    <div id="app">
        {{message}}
        <button v-on:click = "message='hello'">修改</button>
        <button v-on:click = "updateText2">修改</button>
    </div>

    <div id = "jsApp">

    </div>
    <button onclick="updateText();">修改</button>
    
    <script>

        function updateText(){
            document.getElementById("jsApp").innerHTML = "文字修改"
        }

        document.getElementById("jsApp").innerHTML = "hello vue"

        new Vue({
            el: '#app',
            data: {
             message: 'Hello Vue.js!'
            },
            methods:{
                updateText2(){
                    this.message = "hello2"
                }
            }
        })
    </script>
</body>
</html>